<template>
  <div class="Solution">
    <h2 class="solution-title">科比特解决方案</h2>
    <div class="solution-info">
      <template v-for="(item, index) in dataList">
        <div :key="index" class="solution-item" @click="handChangePage(item)">
          <img
            :src="item.image || require('../../../assets/images/cover.png')"
            width="100%"
          />
          <h4>{{ item.name }}</h4>
          <div>{{ item.propagate1 }}</div>
          <div>{{ item.propagate2 }}</div>
        </div>
      </template>
    </div>
  </div>
</template>

<script>
import { GetIndustrySelectLikeList } from "@/api/home";

export default {
  data() {
    return {
      dataList: [
        // {
        //   image: require("../../../assets/images/cover.png"),
        //   propagate1: "11111111",
        //   propagate2: "11111111",
        //   name: "行业类型1",
        // },
        // {
        //   image: require("../../../assets/images/cover.png"),
        //   propagate1: "11111111",
        //   propagate2: "11111111",
        //   name: "行业类型2",
        // },
        // {
        //   image: require("../../../assets/images/cover.png"),
        //   propagate1: "11111111",
        //   propagate2: "11111111",
        //   name: "行业类型3",
        // },
        // {
        //   image: require("../../../assets/images/message.svg"),
        //   propagate1: "11111111",
        //   propagate2: "11111111",
        //   name: "行业类型3",
        // },
        // {
        //   image: require("../../../assets/images/cover.png"),
        //   propagate1: "11111111",
        //   propagate2: "11111111",
        //   name: "行业类型3",
        // },
      ],
      search: {
        pageNo: "1",
        pageSize: "10",
      },
    };
  },
  methods: {
    async initInfo() {
      let resp = await GetIndustrySelectLikeList(this.search);
      if (resp.status === 1) {
        this.dataList = resp.data.data;
      }
    },
    handChangePage(item) {
      this.$router.push(`/industry/${item.id}`);
    },
  },
  mounted() {
    this.initInfo();
  },
};
</script>

<style lang="scss" scoped>
.Solution {
  font-size: 0.16rem;
  padding: 0 0.186667rem;
  text-align: left;
  .solution-title {
    padding-left: 0.15rem;
    font-size: 0.35rem;
  }
  .solution-info {
    display: flex;
    flex-wrap: wrap;
    
    // justify-content: space-between;
    .solution-item {
      width: 33.33%;
      padding-left: 0.15rem;
      padding-right: 0.15rem;
      padding-bottom: 0.1rem;
      margin-bottom: 10px;
      // height: 250px;
      img {
        height: 2.2rem;
        border: 0;
        border-radius: 3px;
      }
      h4 {
        margin: 0;
        margin-top: 0.04rem;
        // font-size: 0.186667rem;
        font-size: 0.3rem;
      }
      div {
        // font-size: 0.1rem;
        font-size: 0.2rem;
        color: rgba(51, 51, 51, 0.6);
      }
    }
  }
}

@media screen and (max-width: 750px) {
  .Solution {
    .solution-info {
      .solution-item {
        width: 50%;
      }
    }
  }
}

// @media screen and (min-width: 1170px) {
//   .Solution {
//     .solution-info {
//       .solution-item {
//         width: 25%;
//       }
//     }
//   }
// }
</style>